@import '../style/var.scss';
$prefix: "em-btn";

.em-btn {
    position: relative;
    padding: 0;
    display: flex;
    height: 44px;
    line-height: 42px;
    border-radius: 2px;
    box-sizing: border-box;
    font-size: 16px;
    text-align: center;
    outline: none;
    justify-content: center;
    align-items: center;

    &-text {
        padding: 0 5px;
    }

    &-default {
        color: $text-color;
        background-color: $button-default-background-color;
        border: 1px solid $button-default-border-color;
    }

    &-primary {
        color: $white;
        background-color: $button-primary-background-color;
        border: 1px solid $button-primary-border-color;
    }

    &-danger {
        color: $white;
        background-color: $button-danger-background-color;
        border: 1px solid $button-danger-border-color;
    }

    &-large {
        width: 100%;
        height: 50px;
        line-height: 48px;
    }
    &-small{
        padding: 0 5px;
        font-size: 12px;
    }
    &-normal {
        padding: 0 15px;
        font-size: 14px;
    }

    &-disabled {
        opacity: 0.5;
    }

    &-round {
        border-radius: 10em;
    }


    &::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        opacity: 0;
        width: 100%;
        height: 100%;
        border: inherit;
        border-color: $black;
        background-color: $black;
        border-radius: inherit;
        /* inherit parent's border radius */
        transform: translate(-50%, -50%);
    }

    &:active::before {
        //按钮点击
        opacity: .15;
    }

}